import request from "@/router/axios";

// 补液工单
export const getPage = (page, params) => {
  return request({
    url: "/admin/storageorder/list",

    method: "get",
    params: {
      ...page,
      ...params,
    },
  });
};
// 添加
export const save = (form) => {
  return request({
    url: "/admin/storageorder/save",
    method: "post",
    data: {
      ...form,
    },
  });
};

// 取消工单
export const cancelOrder = (orderId) => {
  return request({
    url: `/api/uic-system/fillstorageorder/cancelOrder/${orderId}`,
    method: "post",
  });
};

// 派遣
export const assignOrderCar = (orderId, carId) => {
  return request({
    url: `/api/uic-system/fillstorageorder/assignOrder/${orderId}/${carId}`,
    method: "post",
  });
};

export const detailPage = (page, params) => {
  return request({
    url: `/api/uic-system/fillstorageorderdetail/page`,
    method: "get",
    params: {
      ...page,
      ...params,
    },
  });
};
export const shenhe = (form) => {
  return request({
    url: "/api/uic-system/fillstorageorder/confirmApprove",
    method: "post",
    data: {
      ...form,
    },
  });
};
